﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Control="using:BootyBay.PrivateStoreApp.Controls">
    <Style x:Key="ImageButtonStyle"
           TargetType="Control:ImageButton">
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="BorderThickness"
                Value="0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="HorizontalAlignment"
                Value="Right" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="MinHeight"
                Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control:ImageButton">
                    <Grid x:Name="ContentContainer">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation TargetName="ContentContainer" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <!--<Border.Effect>
                                <DropShadowEffect BlurRadius="10" />
                            </Border.Effect>-->
                            <Grid>
                                <Grid>
                                    <Image x:Name="PART_img"
                                           Stretch="Uniform"
                                           Margin="{TemplateBinding Padding}"
                                           VerticalAlignment="Center"
                                           Source="../Images/selectall.png"/>
                                </Grid>
                            </Grid>

                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ImageTextButtonStyle"
           TargetType="Control:ImageButton">
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="Background"
                Value="#FF1F3B53" />
        <Setter Property="BorderBrush"
                Value="#FFA3AEB9" />
        <Setter Property="BorderThickness"
                Value="0" />
        <Setter Property="Padding"
                Value="10,0,5,0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="HorizontalAlignment"
                Value="Right" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="MinHeight"
                Value="5" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control:ImageButton">
                    <Grid x:Name="ContentContainer">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation TargetName="ContentContainer" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid>
                                <Rectangle x:Name="BackgroundGradient"
                                           RadiusY="3"
                                           RadiusX="3"
                                           StrokeThickness="0"
                                           Stroke="Transparent"
                                           Fill="White" />
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>

                                    <Image x:Name="PART_img"
                                           Stretch="None"
                                           Margin="5,0,0,0"
                                           VerticalAlignment="Center" />
                                    <TextBlock x:Name="PART_txb"
                                               FontSize="{TemplateBinding FontSize}"
                                               FontWeight="{TemplateBinding FontWeight}"
                                               Grid.Column="1"
                                               Foreground="Gray"
                                               Margin="{TemplateBinding Padding}"
                                               HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                               VerticalAlignment="Center"
                                               Text="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />
                                </Grid>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource ImageButtonStyle}"
           TargetType="Control:ImageButton" />
</ResourceDictionary>
